<template>
  <div id="lietou">
    <van-notice-bar mode="link" to="me" color="#fff" background="#3af" :scrollable="false" >
      <div style="margin: 0 auto">
        前往PC端添加职位
      </div>
    </van-notice-bar>
    <van-list
      :finished="finished"
      @load="onLoad"
      :offset=100
    >
      <peopleitem v-for="(item,index) in peopleList" :peopleDetail="item" :key="index">
        
      </peopleitem>
      <div style="height:43px;width:100%"/>
    </van-list>
  </div>
</template>

<script>
import Config from './project.config.js'
import peopleitem from '@/components/peopleitem.vue'
export default {
  components:{
    peopleitem : peopleitem
  },
  data(){
    return {
      currentPage: 1,
      finished: false,
      systemInfo:'系统消息测试系统消息测试系统消息测试系统消息测试系统消息测试 ',
      peopleList:[
      ]
    }
  },
  methods: {
    onLoad: function(){
      this.getData()
    },
    getData(){
      this.$http.get(Config.baseUrl + '/api/lietou/resumes/' + this.currentPage).then(
        function(response) {
          console.log('====================================');
          console.log(response);
          if(this.currentPage == response.data.pageNum){

            this.peopleList =this.peopleList.concat(response.data.list)
            this.finished = response.data.isLastPage
            this.currentPage++
          }
          
          console.log('====================================');

        },
        function (error) {
          console.log('====================================');
          console.log(error);
          console.log('====================================');
        }
      )
    }
  },
  mounted(){
    this.getData()
    this.$store.commit('showTab')
    console.log('====================================');
    console.log('showtab');
    console.log('====================================');
  }
}
</script>

<style lang="stylus" scoped>

</style>

